<template>
	<el-container>
		<el-header>诊断结果界面</el-header>
		<el-main>
			<el-row :gutter="20">
				<el-col :span="6">

					就诊日期：

				</el-col>
				<el-col :span="6">

					<el-date-picker v-model="value1" type="date" placeholder="选择日期">
					</el-date-picker>

				</el-col>
				<el-col :span="6">

					就诊医生：

				</el-col>
				<el-col :span="6">
					<div class="grid-content bg-purple">
						<el-input placeholder="请输入内容" v-model="dia.input" clearable>
						</el-input>
					</div>
				</el-col>
			</el-row>
			<el-row :gutter="20">
				<el-col :span="6">

					诊断结果：

				</el-col>
				<el-col :span="18">

					<el-input placeholder="请输入内容" v-model="dia.input2" clearable>
					</el-input>

				</el-col>
			</el-row>
			<el-row :gutter="20">
				<el-col :span="6">

					就诊经过：

				</el-col>
				<el-col :span="18">


					<el-form-item>
						<el-input type="textarea" v-model="dia.process"></el-input>
					</el-form-item>


				</el-col>
			</el-row>
			<el-row :gutter="20">
				<el-col :span="6">

					用药信息：

				</el-col>
				<el-col :span="18">
					<div class="grid-content1 bg-purple">

						<el-form-item>
							<el-input type="textarea" v-model="dia.medicine"></el-input>
						</el-form-item>

					</div>
				</el-col>
			</el-row>
			<el-row :gutter="20">
				<el-col :span="6">

					医生建议：

				</el-col>
				<el-col :span="18">


					<el-form-item>
						<el-input type="textarea" v-model="dia.suggest"></el-input>
					</el-form-item>


				</el-col>
			</el-row>
		</el-main>
		<el-footer>
			<el-row :gutter="20">
				<el-col :span="4">
					<div class="grid-content bg-purple1">
						<el-button>前往打印</el-button>
					</div>
				</el-col>
				<el-col :span="16">
					<div class="grid-content bg-purple1" align="center"></div>
				</el-col>
				<el-col :span="4">
					<div class="grid-content bg-purple1">
						<el-button>
							返回
						</el-button>
					</div>
				</el-col>
			</el-row>
		</el-footer>
	</el-container>
</template>

<script>
	import {
		showMsgTitle
	} from '@/utils/api'
	import {
		showMsgConfirm
	} from '@/utils/api'
	import {
		getRequest
	} from '@/utils/api'

	export default {
		name: 'help',
		props: {
			msg: String
		},
		data() {
			return {
				dia: {
					process: '',
					medicine: '',
					suggest: '',
					input: '',
					input2: ''
				},
				pickerOptions: {
					disabledDate(time) {
						return time.getTime() > Date.now();
					},
				},
				value1: '',
				
			}
		},
		mounted: function() {
			let url = "/doctor/dia";
			let _this = this;
			getRequest(url).then(resp => {
				if (resp.status == 200) {
					alert(resp.data);
					_this.dia = resp.data;
				} else {
					_this.$message({
						type: 'error',
						message: '数据加载失败!'
					});
				}
			}, resp => {
				_this.loading = false;
				if (resp.response.status == 403) {
					_this.$message({
						type: 'error',
						message: resp.response.data
					});
				} else {
					_this.$message({
						type: 'error',
						message: '数据加载失败!'
					});
				}
			}).catch(resp => {
				//压根没见到服务器
				_this.loading = false;
				_this.$message({
					type: 'error',
					message: '数据加载失败!'
				});
			});
			// this.axios.get('/api/user/allUser')
			// 	.then(res => {
			// 		this.tableData = res.data;
			// 	})
			// 	.catch(function(error) {
			// 		console.log(error);
			// 	});
		},
		methods: {
			
		}
	}
</script>

<style>
	.el-footer {
		background-color: #4FC1B0;
		color: #333;
		text-align: center;
		line-height: 60px;
		border-radius: 10px;
	}

	.el-header {
		text-align: left;
		font-size: 40px;
		color: #ffffff;
		border-radius: 10px;
		background-color: #4FC1B0;
	}

	.el-main {
		background-color: #ffffff;
		color: #333;
		text-align: center;
		height: 610px;
		font-size: 24px;
	}

	.el-row {
		margin-bottom: 20px;

		&:last-child {
			margin-bottom: 0;
		}
	}

	.el-col {
		border-radius: 4px;
	}


	.bg-purple {
		background: #ffffff;
	}

	.bg-purple1 {
		background: #4FC1B0;
	}

	.grid-content {
		border-radius: 4px;
		min-height: 36px;
	}

	.grid-content1 {
		border-radius: 4px;
		min-height: 134px;
	}

	.row-bg {
		padding: 10px 0;
		background-color: #f9fafc;
	}
</style>
